<?php

namespace plugins\ltcms_install\middleware;

use \ltcms\middleware\Middleware_contract;

class CheckInstall implements Middleware_contract
{
    /**
     *  处理请求
     */
    public function handle($request, \Closure $next)
    {
        $installedFile=LTCMS_ROOT."/plugins/ltcms_install/installed";
        if(is_file($installedFile)){
            return redirect("/");
        }
        $response = $next($request);
        return $response;
    }
}
